﻿#region using
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
#endregion

namespace AwesomeTanks.Sources.GameElements.ShootElements
{
    /// <summary>
    /// Class which Manage shoot
    /// </summary>
    public class ShootManager
    {
        #region Fields
        public static List<Shoot> ShotList = new List<Shoot>();
        #endregion

        #region Update and Draw
        /// <summary>
        /// Updates all Shoots at the specified game time.
        /// </summary>
        /// <param name="gameTime">The game time.</param>
        public void Update(GameTime gameTime)
        {
            foreach (Shoot shoot in ShotList)
            {
                shoot.Update(gameTime);
            }
        }


        /// <summary>
        /// Draws all Shoots with the specified sprite batch.
        /// </summary>
        /// <param name="spriteBatch">The sprite batch.</param>
        public void Draw(SpriteBatch spriteBatch)
        {
            foreach (Shoot shoot in ShotList)
            {
                shoot.Draw(spriteBatch);
            }
        }
        #endregion
    }
}
